﻿if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[RemindersQueueUpdate]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].RemindersQueueUpdate
GO
                    
CREATE PROCEDURE dbo.RemindersQueueUpdate
(
	@RemindersQueueID int,
	@ApprovalRequestAttempts int,
	@Approved bit,
	@IsBeingProcessed bit,
	@Completed bit,
	@HasErrors bit,
	@Modified datetime
)
AS

SET NOCOUNT ON

UPDATE
	dbo.RemindersQueue
SET
	ApprovalRequestAttempts = @ApprovalRequestAttempts,
	Approved = @Approved,
	IsBeingProcessed = @IsBeingProcessed,
	Completed = @Completed,
	HasErrors = @HasErrors,
	Modified = @Modified
WHERE
	RemindersQueueID = @RemindersQueueID
GO   